package com.yao.ro.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.yao.common.enums.business.ro.GoodsTypeEnum;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 物品表
 *
 * @author autoCode
 * @version 1.0.0-SNAPSHOT
 * @date 2020-05-06
 */
@Data
public class GoodsEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @TableId(value = "`id`", type = IdType.AUTO)
    private Integer id;
    /**
     * 有效状态0-有效
     */
    @TableField(value = "`status`", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_EMPTY)
    private Byte status;
    /**
     * 物品名称
     */
    @TableField(value = "`name`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private String name;
    /**
     * 物品类别（1-装备 2-图纸 3-消耗品 4-制作材料）
     */
    @TableField(value = "`type`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private GoodsTypeEnum type;
    /**
     * 当前价格
     */
    @TableField(value = "`price`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private BigDecimal price;
    /**
     * 物品图片url
     */
    @TableField(value = "`imgUrl`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private String imgUrl;
    /**
     * 购买价格 0表示未购买
     */
    @TableField(value = "`purchasePrice`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private BigDecimal purchasePrice;
    /**
     * 适合出售价格
     */
    @TableField(value = "`salePrice`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private BigDecimal salePrice;
    /**
     * 掉落地点
     */
    @TableField(value = "`place`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private String place;
    /**
     * 魔物
     */
    @TableField(value = "`monster`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private String monster;
    /**
     * 创建时间
     */
    @TableField(value = "`createTime`", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    @TableField(value = "`updateTime`", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}